﻿
namespace NougakudoCompanion.Commons
{
    public static class Constants
    {
        // Local resource settings.
        public const string RESOURCE_APPLICATION = "Application";
        public const string RESOURCE_DOWNLOAD = "Download";
        public const string RESOURCE_RUNTIME = "Runtime";
        public const string RESOURCE_TEMP = "Temp";                 // Add temp resource
        // NougakudoController's runtime modules.
        public const string NOUGAKUGO_CONTRALLER = "NougakuDoController.exe";
        public const string NOUGKUDO_LAUNCHER = "NougakudoLauncher.exe";
        public const string AZURE_CONFIGURATION = "azure.xml";
        public const string AZURE_STORAGE_CLIENT = "Microsoft.WindowsAzure.StorageClient.dll";
        public const string EXTRACT_SCRIPT = "UnZipUtility.vbs";    // VBScript file
        public const string MODULE_LOCATION = "Utils";
        // Azure configuration settings.
        public const string AZURE_CONFIG_NAME = "Name";
        public const string AZURE_CONFIG_ACCOUNT = "Account";
        public const string AZURE_CONFIG_SHAREDKEY = "SharedKey";
        public const string AZURE_CONFIG_CONTAINER = "Container";
        public const string AZURE_CONFIG_INTERVAL = "Interval";
        public const string AZURE_CONFIG_USE_WEB_ROLE = "UseWebRole";
        public const string AZURE_CONFIG_WORKING_FOLDER = "WorkingFolder";
        public const string AZURE_CONFIG_DEVLOPMENTFABRIC = "UseDevelopmentFabric";
        public const string AZURE_CONFIG_VIRTUALHOST = "VirtualHost";   // Add for NougakuDo 1.1.0 above.
        // NougakuDoController configuration.
        public const string CONFIGURATION = "configuration.xml";        // normal configuration.
        public const string CONFIGURATION_BACKUP = "configuration.old"; // backup of configuration.
        public const string NEW_CONFIG = "newconfiguration.xml";        // download is sucess or install result is sucess.

        public const string DOWNLOAD_LIST = "download.xml";             // download request.
        // configuration data for NougakuDo
        public const string RACK_CONFIG = "config.ru";                  // Rack's configuration file.
        public const string ENNOU_CONFIG = "configEnnou.ru";            // NougakuDo's configuration file.
        public const string ENNOU_EXECUTABLE = "serverEnnou.txt";       // Launch command of NougakuDo.
        public const string LAUNCHER = "NougakudoLauncher.exe";
        public const string RUBY = "ruby.exe";
        public const string RAILS_RELATIVE_URL_ROOT = "ENV['RAILS_RELATIVE_URL_ROOT']"; // Add for NougakuDo sub directory mode.
        public const string RAILS_ENVIRONMENT = @"config\environment.rb";               // Add for NougakuDo sub directory mode.
        public const string RAILS_GEMFILE = "Gemfile";                                  // Add for to check rails 3.0.
        public const string RAILS_APPLICATION = @"config\application.rb";               // Add for sub directory mode of rails 3.0.
        public const string RAILS_PRODUCTION = @"config\environments\production.rb";     // Add for static asset server of Ennou.
        public const string RAILS_ASSET_PATH = "config.action_controller.asset_path";   // Add for sub directory mode of rails 3.0.
        public const string RAILS_ASSET_PATH_POINT = "class Application < Rails::Application";   // Add for sub directory mode of rails 3.0.
        public const string RAILS_STATIC_ASSETS = "config.serve_static_assets";         // Add for static asset server of Ennou.
        public const string RUBY_BUNDLE_ENVIRONMENT_VARIABLE = "BUNDLE_GEMFILE";        // Add for BUNDLE_GEMFILE of environment variable.
        public const string RUBY_GEMFILE = "Gemfile";                                   // Add for Gemfile name.
        // public const string VHOST_SUPPORT_VERSION = "1.1";                           // Add for NougakuDo sub directory mode.    // Delete to check NougakuDo 1.1.o above.
        // NougakuDoController controle files.
        public const string RUNNING_NOUGAKUDO = "running.txt";          // during nougakudo process info.
        public const string START_REQUEST = "start.txt";                // start request to nougakudo.
        public const string STOP_REQUEST = "stop.txt";                  // stop request to nougakudo.
        public const string RESTART_REQUEST = "restart.txt";            // restart request to nougakudo.
        public const string ROLE_STOP_REQUEST = "rolestop.txt";         // stop request to NougakudoController

        public const int STOP_INTERVAL = 5000;                          // 5 seconds
        public const int DELETE_RETRY_COUNT = 6;                        // wait time for directory delere. MAX = STOP_INTERVAL * DELETE_RETRY_COUNT
        public const double QUEUE_INTERVAL = 15.0;                      // Check queue storage interval. 15 seconds.
#if (DEBUG)
        // GetShortcutRoot method change RoleInstanceID to value for debug.
        public static string NOUGAKUDO_NAME = "NougakuDoCompanion";     // NougakuDo loggin folder name.
#else
        public const string NOUGAKUDO_NAME = "NougakuDoCompanion";      // NougakuDo loggin folder name.
#endif
    }

    
}
